<?php

abstract class Jf_View_Helper_Abstract implements Jf_View_Helper_Interface {

    public $view = null;

    public function setView (Jf_View_Interface $view) {
        $this -> view = $view;
        return $this;
    }

    public function direct () {}

    public static function getClass ($name, $type) {
        if (stripos ($name, '/')) {
            $parts = explode ('/', $name);
        } else {
            $name = ucwords ($name);
            return $type . '_' . $name;
        }
        $name = '';
        foreach ($parts as $key => $v) {
            if ($key > 0) {
                $name .= '_';
            }
            $name .= ucwords ($v);
        }
        return $type . '_' . $name;
    }

}
